home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
timezone.tab.p
< prev
next >
Wrap
Text File
|
2003-01-03
|
8KB
|
228 lines
{
X = 601;
Y = 65;
state = 0;
rest_x = 601;
expand_x = 400;
Hidden = 1;
ChildID = {
GuiLayer("timezone_layer") {
X = 0;
Y = 0;
ChildID = {
GuiAnimation("plate") {
X = 39;
AnimationID = "gui/dash/tab/plate/plate.pcx";
Width = 240;
Height = 170;
},
GuiTextInput("cur_timezone_label") {
X = 45;
Y = 10;
InputDisabled = TRUE;
Width = 120;
Height = 22;
FontID = "font/tab_w_on_g.tf";
ScriptID = Script {
@animate {
ResPropSetStr(SELF,"InputText",MangleSIDToStr(245/*"Time Zone:"*/));
}
};
},
GuiTextInput("cur_timezone") {
X = 60;
Y = 25;
Width = 180;
Height = 22;
InputDisabled = TRUE;
FontID = "font/verdana_9.tf";
InputText = Mangle(342/*"player 1 name"*/);
ScriptID = Script {
@animate {
resid Player;
resid Game;
resid city_data_id;
str timezone;
Game = ResByName("Game");
city_data_id = ResPropGetResID(ResByName("CSVData"), "city_id");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
timezone = CSVGetStr(city_data_id,"timezone",CSVSearch(city_data_id,"name",ResPropGetStr(Player,"nav_cur_city")));
ResPropSetStr(SELF,"InputText",timezone);
}
};
},
GuiTextInput("cur_date_label") {
X = 45;
Y = 40;
Width = 120;
Height = 22;
InputDisabled = TRUE;
FontID = "font/tab_w_on_g.tf";
ScriptID = Script {
@animate {
ResPropSetStr(SELF,"InputText",MangleSIDToStr(246/*"Date:"*/));
}
};
},
GuiTextInput("cur_date") {
X = 60;
Y = 55;
Width = 200;
Height = 22;
InputDisabled = TRUE;
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid Player;
resid Game;
int time;
str dayofweek;
int day;
str month;
int year;
int time_zone_real_offset;
Game = ResByName("Game");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
time = ResPropGetInt(Player,"time_now");
time_zone_real_offset = ResPropGetInt(Player,"time_zone_real_offset");
time += (time_zone_real_offset * 60);
dayofweek = TimeGetWeekdayStr(time);
month = TimeGetMonthStr(time);
day = TimeGetDay(time);
year = TimeGetYear(time);
ResPropSetStr(SELF,"InputText",StrFormatStr("%s, %s %d, %d",StrCapFirst(dayofweek),StrCapFirst(month),day,year));
}
};
},
GuiTextInput("cur_time_label") {
X = 45;
Y = 70;
Width = 120;
Height = 22;
InputDisabled = TRUE;
FontID = "font/tab_w_on_g.tf";
ScriptID = Script {
@animate {
ResPropSetStr(SELF,"InputText",MangleSIDToStr(247/*"Time:"*/));
}
};
},
GuiTextInput("cur_time") {
X = 60;
Y = 85;
Width = 200;
Height = 22;
InputDisabled = TRUE;
FontID = "font/verdana_9.tf";
ScriptID = Script {
@animate {
resid Player;
resid Game;
int time;
int time_zone_real_offset;
str clock;
Game = ResByName("Game");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
time = ResPropGetInt(Player,"time_now");
time_zone_real_offset = ResPropGetInt(Player,"time_zone_real_offset");
time += (time_zone_real_offset * 60);
clock = TimeGetClock12Str (time);
ResPropSetStr(SELF,"InputText",clock);
}
};
},
GuiAnimation("line") {
AnimationID = "gui/dash/tab/line/line.pcx";
Y = 105;
X = 45;
},
GuiTextInput("notice") {
X = 45;
Y = 110;
Width = 180;
Height = 80;
WordWrap = TRUE;
InputDisabled = TRUE;
FontID = "font/tab_w_on_g.tf";
ScriptID = Script {
@animate {
resid Player;
resid Game;
int time;
str time_zone_real;
str time_zone_clock;
Game = ResByName("Game");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
time_zone_real = ResPropGetStr(Player,"time_zone_real");
time_zone_clock = ResPropGetStr(Player,"time_zone_clock");
if (StrExact(time_zone_real,time_zone_clock)) {
ResPropSetStr(SELF,"InputText",MangleSIDToStr(248/*"Your clock is set to the proper time zone."*/));
} else {
ResPropSetStr(SELF,"InputText",StrFormatStr(MangleSIDToStr(249/*"You have entered the %s zone. Adjust your clock."*/),time_zone_real));
}
}
};
}
};
},
GuiAnimation("tab") {
Y = 10;
AnimationID = "gui/dash/tab/timezone/timezone_off.pcx";
ScriptID = script {
@activate {
resid Parent;
resid Player;
resid Game;
Game = ResByName("Game");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
Parent = GuiParent(SELF);
if ( ResPropGetResID(Player,"truck_tab_expanded") == Parent) {
ResPropSetResID(Player,"truck_tab_expanded",RES_INVALID);
} else {
ResPropSetResID(Player,"truck_tab_expanded",Parent);
GuiToFront(Parent);
}
}
@animate {
resid Parent;
int state;
resid Player;
resid Game;
int time;
str time_zone_real;
str time_zone_clock;
Game = ResByName("Game");
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
Parent = GuiParent(SELF);
time_zone_real = ResPropGetStr(Player,"time_zone_real");
time_zone_clock = ResPropGetStr(Player,"time_zone_clock");
if ( ResPropGetResID(Player,"truck_tab_expanded") == Parent) {
ResPropSetInt(Parent,"X",ResPropGetInt(Parent,"expand_x"));
ResPropSetInt(GuiSiblingByName("timezone_layer"),"Hidden",FALSE);
} else {
ResPropSetInt(GuiSiblingByName("timezone_layer"),"Hidden",TRUE);
ResPropSetInt(Parent,"X",ResPropGetInt(Parent,"rest_x"));
}
if (StrExact(time_zone_real,time_zone_clock)) {
ResPropSetResID(SELF,"AnimationID",ResByName("gui/dash/tab/timezone/timezone_off.pcx"));
} else {
ResPropSetResID(SELF,"AnimationID",ResByName("gui/dash/tab/timezone/timezone_on.pcx"));
}
}
}
}
};
}